#!/usr/bin/env python3.3

#
#  Filename: e30.py
#  Author  : lukas singer
#
#  Comment : Created by createSolution.sh
#

#import euler
#from euler import *

def pe30():
  print(sum(i for i in range(2,9**5*6) if i == sum(int(str(i)[j])**5 for j in range((len(str(i)))))))

if __name__=="__main__":
  pe30()

